The command set vformat will set the sprintf format used for the expansion of scalar variables by the expansion operator `$'. Use only if you are sure of what you are doing. It defaults to ``%.3lg''. See man printf(3) if in doubt.
set vformat string
set vformat %6.2lf set vformat "%.4lg"
$, cmode, C